<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box1{
            width: 100px;
            height: 100px;
            border: 1px solid black;
        }
        .a1{
          width: 35px;
        }
       
    </style>
</head>
<body>
    <div id="app">
        <div>
            <div @mouseenter="show=!show" class="a1" @mouseleave="show=!show">内容</div>
        <div class="box1" v-if="show"></div>
        </div>
       
    </div>
</body>
<script src="./vue.js"></script>
<script>
    let{createApp,ref}=Vue;
    createApp({

        setup(){
            let show=ref(false)
            return{
                show
            }
        }
    }).mount("#app")
</script>
</html>